home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / catD / read.z / read
Encoding:
Text File  |  1998-10-30  |  4.3 KB  |  66 lines

  1.  
  2.  
  3.  
  4. rrrreeeeaaaadddd((((DDDD2222))))                                                              rrrreeeeaaaadddd((((DDDD2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _rrrr_eeee_aaaa_dddd - read data from a device
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_eeee_rrrr_rrrr_nnnn_oooo_...._hhhh_>>>>
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_uuuu_iiii_oooo_...._hhhh_>>>>
  15.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_cccc_rrrr_eeee_dddd_...._hhhh_>>>>
  16.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
  17.      _iiii_nnnn_tttt _p_r_e_f_i_x_rrrr_eeee_aaaa_dddd_((((_dddd_eeee_vvvv______tttt _d_e_v_,,,, _uuuu_iiii_oooo______tttt _****_u_i_o_p_,,,, _cccc_rrrr_eeee_dddd______tttt _****_c_r_p_))))_;;;;
  18.  
  19.    AAAArrrrgggguuuummmmeeeennnnttttssss
  20.      _d_e_v       Device number.
  21.  
  22.      _u_i_o_p      Pointer to the _uuuu_iiii_oooo(D4) structure that describes where the data
  23.                is to be stored in user space.
  24.  
  25.      _c_r_p       Pointer to the user credential structure for the I/O
  26.                transaction.
  27.  
  28. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  29.      The driver _rrrr_eeee_aaaa_dddd routine is called during the _rrrr_eeee_aaaa_dddd(2) system call.  The
  30.      _rrrr_eeee_aaaa_dddd routine is responsible for transferring data from the device to the
  31.      user data area.
  32.  
  33.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  34.      The _rrrr_eeee_aaaa_dddd routine should return 0 for success, or the appropriate error
  35.      number.
  36.  
  37. UUUUSSSSAAAAGGGGEEEE
  38.      This entry point is optional, and is valid for character device drivers
  39.      only.
  40.  
  41.      The pointer to the user credentials, _c_r_p, is available so the driver can
  42.      check to see if the user can read privileged information, if the driver
  43.      provides access to any.  The _uuuu_iiii_oooo structure provides the information
  44.      necessary to determine how much data should be transferred.  The
  45.      _uuuu_iiii_oooo_mmmm_oooo_vvvv_eeee(D3) function provides a convenient way to copy data using the _uuuu_iiii_oooo
  46.      structure.
  47.  
  48.      Block drivers that provide a character interface can use _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk(D3) to
  49.      perform the data transfer with the driver's _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy(D2) routine.
  50.  
  51.    SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
  52.      The _rrrr_eeee_aaaa_dddd routine has user context and can sleep.
  53.  
  54. RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
  55.      _dddd_rrrr_vvvv______pppp_rrrr_iiii_vvvv(D3), _eeee_rrrr_rrrr_nnnn_oooo_ssss(D5), _pppp_hhhh_yyyy_ssss_iiii_oooo_cccc_kkkk(D3), _ssss_tttt_rrrr_aaaa_tttt_eeee_gggg_yyyy(D2), _uuuu_iiii_oooo(D4),
  56.      _uuuu_iiii_oooo_mmmm_oooo_vvvv_eeee(D3), _uuuu_rrrr_eeee_aaaa_dddd_cccc(D3), _wwww_rrrr_iiii_tttt_eeee(D2)
  57.  
  58.  
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.